home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_root.gameOn == 1 && _root.gameOver == 0)
- {
- scoreCount++;
- }
- if(_root.gameOver == 1 && accumulated == 0)
- {
- _root.score += 200 * _root.lives;
- accumulated = 1;
- }
- if(scoreCount >= 30)
- {
- _root.score += 20;
- scoreCount -= 30;
- }
- if(_root.lives <= 0)
- {
- _root.gameOn = 0;
- _root.music.stop();
- }
- if(_root.invincTimer > 0)
- {
- _root.invincMiniTimer = _root.invincMiniTimer + 1;
- _root.invincTimer--;
- }
- if(_root.invincMiniTimer == 10)
- {
- _root.setAlphaAlive(50);
- }
- if(_root.invincMiniTimer == 20)
- {
- _root.setAlphaAlive(0);
- _root.invincMiniTimer = 0;
- }
- if(_root.invincTimer <= 0)
- {
- _root.setAlphaAlive(0);
- _root.invincibility = 0;
- _root.invincMiniTimer = 0;
- }
- if(phase == 2)
- {
- _root.groundSpeed = 7;
- _root.blockMax -= 10;
- }
- if(phase == 3)
- {
- _root.groundSpeed = 9;
- _root.blockMax -= 5;
- }
- if(_root.gameOn == 1)
- {
- blockTick++;
- if(blockTick >= _root.blockMax && _root.phase != 4)
- {
- howMany = random(3);
- i = 0;
- while(i < howMany)
- {
- _root.block.duplicateMovieClip("block" + _root.blockCount,_root.i + 2500);
- _root["block" + _root.blockCount]._y = random(300) + 50;
- _root["block" + _root.blockCount]._x = 700;
- _root.blockCount = _root.blockCount + 1;
- _root.i = _root.i + 1;
- blockTick = 0;
- i++;
- }
- }
- }
- if(_root.phase == 4 && blockTick >= _root.blockMax * 3)
- {
- _root.sendStar();
- blockTick = 0;
- }
- if(_root.spikeCount >= 100)
- {
- _root.spikeCount = 0;
- }
- if(_root.stars2Count >= 100)
- {
- _root.stars2Count = 0;
- }
- if(_root.blockCount >= 100)
- {
- _root.blockCount = 0;
- }
- if(_root.groundCount >= 100)
- {
- _root.groundCount = 0;
- }
- if(_root.ceilingCount >= 100)
- {
- _root.ceilingCount = 0;
- }
- if(_root.starsCount >= 100)
- {
- _root.starsCount = 0;
- }
- }
-